Skip to main content

mobileExportImageToAlbum

Type

command

Summary

Saves an image to the user's photo album.

Syntax

mobileExportImageToAlbum { <imageData> | <image> }, [<fileName>]

Description

Use the mobileExportImageToAlbum to save an image to the user's photo album of gallery. If used on an iOS device that has a camera, the image is saved to the Camera Roll, otherwise it is saved to the Saved Photos album. On Android, images are saved to the default Pictures folder (the Write External Storage permission must be enabled to allow the application to write in the public folder).

note

When running in the iOS simulator, there needs to be at least one image in the photo album for exporting to succeed. You can add images to the photo album in a simulator by dragging an image on the simulator window, and saving the image to album from Safari (click and hold on the image to bring up an alert with the option).

Parameters

NameTypeDescription

imageData

The binary data of an image in PNG, GIF or JPEG format.

image

An object reference for an image containing an image in PNG, GIF or JPEG format.

fileName

Name under which the image file is to be saved on the Android file system. A random name is generated if a name is not specified.

Examples

mobileExportImageToAlbum tImageText
mobileExportImageToAlbum the text of image 1
put the long ID of image "myImage" into tImageID
mobileExportImageToAlbum tImageID
// Android only
put the long ID of image "myImage" into tImageID
mobileExportImageToAlbum tImageID, "my_file"

command: mobilePickPhoto

glossary: object reference

object: image

Compatibility and Support

Introduced

LiveCode 4.6.1

OS

ios

android

Platforms

mobile

Thank you for your feedback!

Was this page helpful?